home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Macintosh Drag and Drop / Demo Applications / Dragster / DragText Sources / utility.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-03  |  492 b   |  37 lines  |  [TEXT/KAHL]

  1. /*
  2.  *
  3.  *        utility.c
  4.  *
  5.  *        Utility routines.
  6.  *        
  7.  *
  8.  *        Author:        Rob Johnston
  9.  *        Date:        Tuesday, January 14, 1992
  10.  *
  11.  *        12/30/94    JML        Code now compiles with Universal interfaces.
  12.  *
  13.  *        Copyright © 1992 Apple Computer, Inc.
  14.  *
  15.  */
  16.  
  17. #include <Types.h>
  18.  
  19. /*
  20.  *    PStrCmp returns true if the two given pascal strings are equal.
  21.  */
  22.  
  23. short PStrCmp(char *s1, char *s2)
  24.  
  25. {    short        size, index;
  26.  
  27.     size = s1[0] + 1;
  28.  
  29.     while (size--) {
  30.         if (*(s1++) != *(s2++))
  31.             return(false);
  32.     }
  33.  
  34.     return(true);
  35. }
  36.  
  37.